<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book NoSQL简介 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>安装 | NoSQL简介</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../part1/2.html" />
    
    
    <link rel="prev" href="../index.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="1"
        data-chapter-title="安装"
        data-filepath="part1/1.md"
        data-basepath=".."
        data-revision="Thu Nov 02 2017 21:26:40 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        简介
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1" data-path="part1/1.html">
            
                
                    <a href="../part1/1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="part1/2.html">
            
                
                    <a href="../part1/2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3" data-path="part1/3.html">
            
                
                    <a href="../part1/3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        服务器与客户端
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4" data-path="part2/4.html">
            
                
                    <a href="../part2/4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        数据操作
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="part2/4_1.html">
            
                
                    <a href="../part2/4_1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        string
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="part2/4_2.html">
            
                
                    <a href="../part2/4_2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        键命令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="part2/4_3.html">
            
                
                    <a href="../part2/4_3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        hash
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="part2/4_4.html">
            
                
                    <a href="../part2/4_4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        list
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="part2/4_5.html">
            
                
                    <a href="../part2/4_5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        set
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="part2/4_6.html">
            
                
                    <a href="../part2/4_6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        zset
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="part3/5.html">
            
                
                    <a href="../part3/5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        与python交互
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="part3/5_1.html">
            
                
                    <a href="../part3/5_1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="part3/5_2.html">
            
                
                    <a href="../part3/5_2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        string-增加
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="part3/5_3.html">
            
                
                    <a href="../part3/5_3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        string-获取
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="part3/5_4.html">
            
                
                    <a href="../part3/5_4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        string-修改
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="part3/5_5.html">
            
                
                    <a href="../part3/5_5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        string-删除
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="part3/5_6.html">
            
                
                    <a href="../part3/5_6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        获取键
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="part4/6.html">
            
                
                    <a href="../part4/6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        搭建主从
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7" data-path="part4/7.html">
            
                
                    <a href="../part4/7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        搭建集群
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="part4/7_1.html">
            
                
                    <a href="../part4/7_1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        配置机器1
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="part4/7_2.html">
            
                
                    <a href="../part4/7_2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        配置机器2
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="part4/7_3.html">
            
                
                    <a href="../part4/7_3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        创建集群
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="part4/7_4.html">
            
                
                    <a href="../part4/7_4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.4.</b>
                        
                        Python交互
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" data-path="8.html">
            
                
                    <a href="../8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        总结与作业
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >NoSQL简介</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x5B89;&#x88C5;">&#x5B89;&#x88C5;</h1>
<ul>
<li>&#x4E0B;&#x8F7D;&#xFF1A;&#x6253;&#x5F00;<a href="https://redis.io/" target="_blank">redis&#x5B98;&#x65B9;&#x7F51;&#x7AD9;</a>&#xFF0C;&#x63A8;&#x8350;&#x4E0B;&#x8F7D;&#x7A33;&#x5B9A;&#x7248;&#x672C;(stable)</li>
<li>&#x5F53;&#x524D;ubuntu&#x865A;&#x62DF;&#x673A;&#x4E2D;&#x5DF2;&#x7ECF;&#x5B89;&#x88C5;&#x597D;&#x4E86;redis&#xFF0C;&#x4EE5;&#x4E0B;&#x6B65;&#x9AA4;&#x53EF;&#x4EE5;&#x8DF3;&#x8FC7;</li>
<li>step1:&#x89E3;&#x538B;</li>
</ul>
<pre><code>tar zxvf redis-3.2.5.tar.gz
</code></pre><ul>
<li>step2:&#x590D;&#x5236;&#xFF0C;&#x653E;&#x5230;usr/local&#x76EE;&#x5F55;&#x4E0B;</li>
</ul>
<pre><code>sudo mv -r redis-3.2.5/* /usr/local/redis/
</code></pre><ul>
<li>step3:&#x8FDB;&#x5165;redis&#x76EE;&#x5F55;</li>
</ul>
<pre><code>cd /usr/local/redis/
</code></pre><ul>
<li>step4:&#x751F;&#x6210;</li>
</ul>
<pre><code>sudo make
</code></pre><ul>
<li>step5:&#x6D4B;&#x8BD5;,&#x8FD9;&#x6BB5;&#x8FD0;&#x884C;&#x65F6;&#x95F4;&#x4F1A;&#x8F83;&#x957F;</li>
</ul>
<pre><code>sudo make test
</code></pre><ul>
<li>step6:&#x5B89;&#x88C5;,&#x5C06;redis&#x7684;&#x547D;&#x4EE4;&#x5B89;&#x88C5;&#x5230;/usr/bin/&#x76EE;&#x5F55;</li>
</ul>
<pre><code>sudo make install
</code></pre><ul>
<li>step7:&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x79FB;&#x52A8;&#x5230;/etc/&#x76EE;&#x5F55;&#x4E0B;</li>
<li>&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x76EE;&#x5F55;&#x4E3A;/usr/local/redis/redis.conf</li>
</ul>
<pre><code>sudo cp /usr/local/redis/redis.conf /etc/redis/
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../index.html" class="navigation navigation-prev " aria-label="Previous page: 简介"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../part1/2.html" class="navigation navigation-next " aria-label="Next page: 配置"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"toggle-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book NoSQL简介 -->
</html>
